//See: https://nodejs.org/dist/latest-v6.x/docs/api/console.html
'use strict';
var moment = require('moment');

console.time('time-elapsed');

const token = 'bill';
const a = 2;
const b = '3';
const obj = {
    token: moment().format('YYYY-MM-DD HH:mm:ss')
}

console.info(`hello ${token}.and result is:${moment().format('YYYY-MM-DD HH:mm:ss')}`);

console.info(`hello ${token}.and result is:${+b + a}`);

console.trace(`hello ${token}.and result is:${+b + a}`);

// The console.warn() function is an alias for console.error().
console.warn(`hello ${token}.and result is:${+b + a}`);

const myConsole = Object.setPrototypeOf({
    assert(assertion, message, ...args) {
        try {
            console.assert(assertion, message, ...args);
        } catch (err) {
            console.error(err.stack);
        }
    }
}, console);
myConsole.assert(false, 'console assert test with param:%s', 'you should see this msg.');

console.info('After override default console\'s assert,you should see this print.');

console.timeEnd('time-elapsed');